home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / READER_1 / FDS__1_0 / CD_FD_1_ / FORMATDR.C < prev    next >
Text File  |  1992-07-19  |  583b  |  36 lines

  1.  
  2. #include "FormatDriver.h"
  3.  
  4. ControlHandle
  5. GetXControl(WindowPtr window, char name)
  6. {
  7.     ControlHandle    control;
  8.     Str255            title;
  9.  
  10.     control = ((WindowPeek)window)->controlList;
  11.     while (control != NULL) {
  12.         GetCTitle(control,title);
  13.         if (title[0] == 1 && title[1] == name) {
  14.             return(control);
  15.         }
  16.         control = (**control).nextControl;
  17.     }
  18.     return NULL;
  19. }
  20.  
  21. void
  22. InfoAlert(short strID)
  23. {
  24.     StringHandle    strHdl;
  25.  
  26.     strHdl = GetString(strID);
  27.     if (strHdl == NULL) {
  28.         SysBeep(0);
  29.         return;
  30.     }
  31.     ParamText(*strHdl,"","","");
  32.     ReleaseResource(strHdl);
  33.     InitCursor();
  34.     NoteAlert(ALRTinfo,NULL);
  35. }
  36.